<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>测试</title>
<script type="text/javascript" src="http://localhost:8080/baskserver-test/baskserver/res/baskreport/js/view/BaskReport.bundle.js"></script>
</head>
<body>
<button onClick="print()">打印单张报表</button>
<button onClick="multiprint()">打印多张报表</button>
<button onClick="preview()">预览HTML报表</button>
<button onClick="exportWord()">导出Word</button>
<button onClick="exportExcel()">导出Excel</button>
<button onClick="exportCsv()">导出Csv</button>
<button onClick="exportPdf()">导出Pdf</button>
<button onClick="multiexport()">导出多张报表到一个PDF文件</button>
<script>
    var REPORT_BASE_URL = 'http://localhost:8080/baskserver-test';
    function print(){
        BaskReport.doPrint({
            id:3501,
            baseUrl:REPORT_BASE_URL
        });
    }
    function multiprint(){
        BaskReport.doMultiPrint({
            baseUrl:REPORT_BASE_URL,
            files:[
                {
                    id:1
                },
                {
                    id:1
                }
            ]
        });
    }
    function multiexport(){
        BaskReport.doExportMultiPdf({
            baseUrl:REPORT_BASE_URL,
            files:[
                {
                    id:2001
                },
                {
                    id:1501
                }
            ]
        });
    }
    function preview(){
        BaskReport.doPreview({
            baseUrl:REPORT_BASE_URL,
            id:101
        });
    }
    function exportWord(){
        BaskReport.doExportWord({
            baseUrl:REPORT_BASE_URL,
            id:101
        });
    }
    function exportExcel(){
        BaskReport.doExportExcel({
            baseUrl:REPORT_BASE_URL,
            id:101
        });
    }
    function exportCsv(){
        BaskReport.doExportCsv({
            baseUrl:REPORT_BASE_URL,
            id:101
        });
    }
    function exportPdf(){
        BaskReport.doExportPdf({
            baseUrl:REPORT_BASE_URL,
            id:101
        });
    }
</script>
</body>
</html>